package testing;


import junit.framework.Assert;
import logicaDePredicados.LogicPredicate;

import org.junit.Before;
import org.junit.Test;

import exceptions.UnDecidibleValueException;

public class LogicPredicateTest {
	private LogicPredicate<String> animal;
	@Before
	public void setUp() throws Exception {
		animal = new LogicPredicate<String>("ANIMAL");
		animal.addTruthValue("perro",new Boolean (true));
		animal.addTruthValue("ganso",new Boolean (true));
		animal.addTruthValue("pato",new Boolean (true));
		animal.addTruthValue("zorro",new Boolean (true));
		animal.addTruthValue("gallo",new Boolean (true));
		animal.addTruthValue("gallina",new Boolean (true));
		animal.addTruthValue("pez",new Boolean (true));
		animal.addTruthValue("ballena",new Boolean (true));
		animal.addTruthValue("mesa",new Boolean (false));
		animal.addTruthValue("silla",new Boolean (false));
		animal.addTruthValue("balcon",new Boolean (false));
		animal.addTruthValue("termo",new Boolean (false));
		animal.addTruthValue("helecho",new Boolean (false));
		
		
	}
	@Test
	public void testCase () throws UnDecidibleValueException {
		
		Assert.assertNotNull(animal.getTruthValue("mesa"));		
		Assert.assertNotNull(animal);
		Assert.assertNotNull(animal.getTruthValue("helecho"));
		Assert.assertNotNull(animal.toString());
		System.out.println(animal.toString());
		System.out.println(animal.getTruthValue("helecho"));
		
	}

}
